# 论坛注册
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options

url = r'http://192.168.183.140/upload/'
driver = webdriver.Chrome(options=options)
driver.get(url)
# 窗口最大化
driver.maximize_window()

# 注册
driver.find_element(By.LINK_TEXT, '立即注册').click()
sleep(3)
driver.find_element(By.ID, 'y99G29').clear()
driver.find_element(By.ID, 'y99G29').send_keys('yh1')
driver.find_element(By.ID, 'IsW5M7').clear()
driver.find_element(By.ID, 'IsW5M7').send_keys('123456')
driver.find_element(By.ID, 'vK663s').clear()
driver.find_element(By.ID, 'vK663s').send_keys('123456')
driver.find_element(By.ID, 'LOosck').clear()
driver.find_element(By.ID, 'LOosck').send_keys('yh1@qq.com')
driver.find_element(By.ID, 'registerformsubmit').click()
sleep(5)

# 退出
driver.find_element(By.LINK_TEXT, '退出').click()
sleep(3)

driver.quit()
